<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title><?php echo $this->settings_lib->site_name?></title>


<?php echo css('admin/admin.css');?>
<!--[if IE]>
<?php echo css('admin/line_ie.css');?>
<![endif]-->
<!--  jquery core -->
<?php echo js('jquery/jquery.min.js');?>
<!--  checkbox styling script -->
<?php echo js('jquery/jquery-ui.min.js');?>
<?php echo js('jquery/ui.checkbox.js');?>
<?php echo js('jquery/jquery.bind.js');?>



<?php echo css('admin/file/jquery.fileupload-ui.css');?>
<?php echo css('admin/file/files.css');?>

<?php echo js('plugins.js');?>
<?php echo js('scripts.js');?>
<?php echo js('jquery/jquery.colorbox.min.js');?>
<?php echo js('jquery/jquery.cooki.js');?>
<?php echo js('jquery/file/jquery.fileupload.js');?>
<?php echo js('jquery/file/jquery.fileupload-ui.js');?>
<?php echo js('jquery/file/jquery.ba-hashchange.min.js');?>
<?php echo js('jquery/file/functions.js');?>

<script type="text/javascript">
	pyro = { 'lang' : {} };
	var APPPATH_URI					= "<?php echo APPPATH_URI;?>";
	var SITE_URL					= "<?php echo rtrim(site_url(), '/').'/';?>";
	var BASE_URL					= "<?php echo BASE_URL;?>";
	var BASE_URI					= "<?php echo BASE_URI;?>";
	var UPLOAD_PATH					= "<?php echo UPLOAD_PATH;?>";
	var DEFAULT_TITLE				= "<?php echo addslashes($this->settings_lib->site_name); ?>";
	// Deprecated
	var DIALOG_MESSAGE				= "<?php echo lang('global:dialog:delete_message'); ?>";
	pyro.admin_theme_url			= "<?php echo BASE_URL . 'admin/'; ?>";
	pyro.apppath_uri				= "<?php echo APPPATH_URI; ?>";
	pyro.base_uri					= "<?php echo BASE_URI; ?>";
	pyro.lang.remove				= "<?php echo lang('global:remove'); ?>"
	pyro.lang.delete				= "<?php echo lang('global:delete'); ?>"
	pyro.lang.dialog_message 		= DIALOG_MESSAGE;
</script>

<script type="text/javascript">
$(function(){
	$('input').checkBox();
	$('#toggle-all').click(function(){
	 	$('#toggle-all').toggleClass('toggle-checked');
		$('#mainform input[type=checkbox]').checkBox('toggle');
		return false;
	});
});
</script>  
			
<script type="text/javascript">
$(function(){
	$('input').checkBox();
	$('#toggle-all').click(function(){
	 	$('#toggle-all').toggleClass('toggle-checked');
		$('#mainform input[type=checkbox]').checkBox('toggle');
		return false;
	});
});
</script>  

<![if !IE 7]>
<!--  styled select box script version 1 -->
<?php echo js('jquery/jquery.selectbox-0.5.js')?>
<script type="text/javascript">
$(document).ready(function() {
	$('.styledselect').selectbox({ inputClass: "selectbox_styled" });
});
</script>
<![endif]>
<!--  styled select box script version 2 --> 
<?php echo js('jquery/jquery.selectbox-0.5_style_2.js')?>
<script type="text/javascript">
$(document).ready(function() {
	$('.styledselect_form_1').selectbox({ inputClass: "styledselect_form_1" });
	$('.styledselect_form_2').selectbox({ inputClass: "styledselect_form_2" });
});
</script>
<!--  styled select box script version 3 --> 
<?php echo js('jquery/jquery.selectbox-0.5_style_2.js')?>
<script type="text/javascript">
$(document).ready(function() {
	$('.styledselect_pages').selectbox({ inputClass: "styledselect_pages" });
});
</script>

<!--  styled file upload script --> 
<?php echo js('jquery/jquery.filestyle.js')?>
<script type="text/javascript" charset="utf-8">
  $(function() {
      $("input.file_1").filestyle({ 
          image: "<?php echo image_url('admin/forms/choose-file.gif')?>",
          imageheight : 21,
          imagewidth : 78,
          width : 310
      });
  });
</script>

<!-- Custom jquery scripts -->
<?php echo js('jquery/custom_jquery.js')?>
<!-- Tooltips -->
<?php echo js('jquery/jquery.tooltip.js')?>
<?php echo js('jquery/jquery.dimensions.js')?>
<script type="text/javascript">
$(function() {
	$('a.info-tooltip ').tooltip({
		track: true,
		delay: 0,
		fixPNG: true, 
		showURL: false,
		showBody: " - ",
		top: -35,
		left: 5
	});
});
</script> 


<!--  date picker script -->
<?php echo css('admin/datePicker.css')?>
<?php echo js('jquery/date.js')?>
<?php echo js('jquery/jquery.datePicker.js')?>
<script type="text/javascript" charset="utf-8">
        $(function()
{

// initialise the "Select date" link
$('#date-pick')
	.datePicker(
		// associate the link with a date picker
		{
			createButton:false,
			startDate:'01/01/2005',
			endDate:'31/12/2020'
		}
	).bind(
		// when the link is clicked display the date picker
		'click',
		function()
		{
			updateSelects($(this).dpGetSelected()[0]);
			$(this).dpDisplay();
			return false;
		}
	).bind(
		// when a date is selected update the SELECTs
		'dateSelected',
		function(e, selectedDate, $td, state)
		{
			updateSelects(selectedDate);
		}
	).bind(
		'dpClosed',
		function(e, selected)
		{
			updateSelects(selected[0]);
		}
	);
	
var updateSelects = function (selectedDate)
{
	var selectedDate = new Date(selectedDate);
	$('#d option[value=' + selectedDate.getDate() + ']').attr('selected', 'selected');
	$('#m option[value=' + (selectedDate.getMonth()+1) + ']').attr('selected', 'selected');
	$('#y option[value=' + (selectedDate.getFullYear()) + ']').attr('selected', 'selected');
}
// listen for when the selects are changed and update the picker
$('#d, #m, #y')
	.bind(
		'change',
		function()
		{
			var d = new Date(
						$('#y').val(),
						$('#m').val()-1,
						$('#d').val()
					);
			$('#date-pick').dpSetSelected(d.asString());
		}
	);

// default the position of the selects to today
var today = new Date();
updateSelects(today.getTime());

// and update the datePicker to reflect it...
$('#d').trigger('change');
});
</script>

<!-- MUST BE THE LAST SCRIPT IN <HEAD></HEAD></HEAD> png fix -->
<script type="text/javascript">
$(document).ready(function(){
$(document).pngFix( );
});
</script>
<?php echo js('jquery/jquery.pngFix.pack.js')?>